package com.higgins.eventtracking.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.higgins.eventtracking.client.dto.BodyStatsDTO;
import com.higgins.eventtracking.client.dto.ChartDataDTO;
import com.higgins.eventtracking.client.dto.FinanceStatsDTO;
import com.higgins.eventtracking.client.dto.GoalDTO;
import com.higgins.eventtracking.client.dto.HealthAlertDTO;
import com.higgins.eventtracking.client.dto.HealthEventDTO;
import com.higgins.eventtracking.client.dto.HealthStatsDTO;
import com.higgins.eventtracking.client.dto.RuleDTO;
import com.higgins.eventtracking.client.dto.SupportDTO;
import com.higgins.eventtracking.client.dto.TimeTableTaskDTO;
import com.higgins.eventtracking.client.dto.TrackingEventDTO;
import com.higgins.eventtracking.client.dto.TransactionDTO;
import com.higgins.eventtracking.client.dto.WeightEventDTO;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("greet")
public interface EventTrackingService extends RemoteService {
	Integer getWeekNumber() throws IllegalArgumentException;
	Integer getDayOfYearNumber(Date date) throws IllegalArgumentException;
	String insertTrackingEvent(TrackingEventDTO dto) throws IllegalArgumentException;
	TrackingEventDTO retrieveTrackingEvent(String eventType) throws IllegalArgumentException;
	String insertTransaction(TransactionDTO dto) throws IllegalArgumentException;
//	FinanceStatsDTO retrieveFinanceStats() throws IllegalArgumentException;
	String insertHealthEvent(HealthEventDTO dto) throws IllegalArgumentException;
	String insertBodyEvent(BodyStatsDTO dto) throws IllegalArgumentException;
	HealthStatsDTO retrieveHealthStats() throws IllegalArgumentException;
	List<HealthStatsDTO> retrieveHealthStats(Date start, Date end) throws IllegalArgumentException;
//	ChartDataDTO retrieveFinanceChartData(Boolean weeklyChart)	throws IllegalArgumentException;
	List<Double> retrieveExerciseChartData(String exercise)	throws IllegalArgumentException;
	List<TrackingEventDTO> retrieveExerciseChartDataDTO(String exercise)	throws IllegalArgumentException;
    List<WeightEventDTO> retrieveWeightEventChartDataDTO(String type) throws IllegalArgumentException;
	List<Double> retrieveWeightChartData(String exercise, Boolean monthlyOrWeekly)	throws IllegalArgumentException;
	Integer retrieveDaysSinceExercise() throws IllegalArgumentException;
	Integer retrieveDaysSinceLowFrameOfMind() throws IllegalArgumentException;
	Integer retrieveDaysSinceLowWellBeing() throws IllegalArgumentException;
	Integer getWellBeing() throws IllegalArgumentException;
	Integer retrieveDaysSinceLowEnergy() throws IllegalArgumentException;
	Integer retrieveDaysSinceSleep() throws IllegalArgumentException;
	Integer retrieveDaysSinceDump() throws IllegalArgumentException;
	Integer retrieveDaysSinceSalad() throws IllegalArgumentException;
	Integer retrieveDaysSinceFruit() throws IllegalArgumentException;
	Integer retrieveDaysSinceVeg() throws IllegalArgumentException;
	Integer retrieveDaysSinceRoughage() throws IllegalArgumentException;
	Integer retrieveDaysSinceStretch() throws IllegalArgumentException;
	Integer retrieveHoursSinceBrushTeeth() throws IllegalArgumentException;
	Integer retrieveHoursSinceWater() throws IllegalArgumentException;
	Integer retrieveHoursSinceFood() throws IllegalArgumentException;
	String retrieveFirstEaten() throws IllegalArgumentException;
	Integer retrieveDaysSinceBloated() throws IllegalArgumentException;
	Integer retrieveDaysSinceBisacodyl() throws IllegalArgumentException;	
	Integer retrieveNumberOfBrushesToday() throws IllegalArgumentException;
	List<String> retrieveAchievements() throws IllegalArgumentException;
	List<String> retrieveAchievements(String frameOfMind, Integer weekNumber) throws IllegalArgumentException;
	List<String> retrieveAchievements(Date startDate, Date endDate, String intensity, String frameOfMind ) throws IllegalArgumentException;
	Boolean insertFrameOfMind(String frameOfMind) throws IllegalArgumentException;
	Boolean frameOfMindSetToday() throws IllegalArgumentException;
	Boolean healthEventToday(String healthEventType) throws IllegalArgumentException;
	Boolean weightEventToday(String weightEventType) throws IllegalArgumentException;
	String insertWeightEvent(WeightEventDTO weightEvent) throws IllegalArgumentException;
	Integer retrieveDaysSinceFrameOfMind(String frameOfMind) throws IllegalArgumentException;
	List<HealthAlertDTO> retrieveHealthAlerts() throws IllegalArgumentException;
	List<HealthAlertDTO> retrieveHealthAlerts(String tabTitle) throws IllegalArgumentException;
	String updateHealthAlert(HealthAlertDTO dto) throws IllegalArgumentException;
	List<TimeTableTaskDTO> retrieveTimeTableTasks(Date now) throws IllegalArgumentException;
	List<TimeTableTaskDTO> retrieveTimeTableTasks(Boolean yearly, Boolean monthly, Boolean weekly, Boolean daily, Boolean holidays, Date now) throws IllegalArgumentException;
	List<TimeTableTaskDTO> retrieveTimeTableFuel(Boolean yearly, Boolean monthly, Boolean weekly, Boolean daily, Boolean holidays, Date now) throws IllegalArgumentException;
	String updateTimeTableTask(TimeTableTaskDTO dto) throws IllegalArgumentException;
	List<GoalDTO> retrieveGoals(String frameOfMind) throws IllegalArgumentException;
	String updateGoal(GoalDTO goal) throws IllegalArgumentException;
	List<HealthEventDTO> retrieveHealthEvents(String event) throws IllegalArgumentException;
	List<HealthEventDTO> retrieveHealthEvents(String event, String eventTwo) throws IllegalArgumentException;
	Long deleteGoal(Long id) throws IllegalArgumentException;
	String completeGoal(GoalDTO dto) throws IllegalArgumentException;
	List<SupportDTO> retrieveSupport() throws IllegalArgumentException;
	String updateSupport(SupportDTO support) throws IllegalArgumentException;
	Long deleteSupport(Long id) throws IllegalArgumentException;
	HealthAlertDTO retrievePeriodSinceAlert(HealthAlertDTO dto) throws IllegalArgumentException;	
    List<RuleDTO> retrieveRules(String parentDynamicType, String frameOfMind) throws IllegalArgumentException;
    List<RuleDTO> retrieveRules(String parentDynamicType, String frameOfMind, Date startDate, Date endDate) throws IllegalArgumentException;
	String updateRule(RuleDTO goal) throws IllegalArgumentException;
	Long deleteRule(Long id) throws IllegalArgumentException;
	String retrieveRecommendedFrameOfMind() throws IllegalArgumentException;
	Double retrieveMaxWeightThisWeek(String exercise) throws IllegalArgumentException;
	Double retrieveMaxDistanceThisWeek(String exercise) throws IllegalArgumentException;
	
}
